package com.groupseven.backend.services.impl;

import com.groupseven.backend.domain.Log.SysLog;
import com.groupseven.backend.mapper.SysLogMapper;
import com.groupseven.backend.services.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

@Transactional
@Service
public class SysLogServiceImpl implements SysLogService {
    @Autowired
    private SysLogMapper sysLogMapper;

    /**
     * @Author 王兆阳
     * @param sysLog
     * @return
     */
    public int insertSysLog(SysLog sysLog){
        return sysLogMapper.insertSysLog(sysLog);
    }

    /**
     * @Author 王兆阳
     * @return
     */
    public List<SysLog> selectSysLog(){
        return sysLogMapper.selectSysLog();
    }

    public int mutildelSysLogBycreatetimelist(List<Date> createtimes){
        return sysLogMapper.mutildelSysLogBycreatetimelist(createtimes);
    }


    public  List<SysLog> selectSysLogByBystimeandetime(Date stime, Date etime){
        return sysLogMapper.selectSysLogByBystimeandetime(stime,etime);
    }

    public int deleteSysLogBycreatetime(String createtime){
        return sysLogMapper.deleteSysLogBycreatetime(createtime);
    }
}
